<?php
/**
 * Kalaisoo.
 *
 * A lightweight no-framework framework written in PHP.
 *
 * @package Kalaisoo
 * @author $Author: info@sah-company.com $
 * @version $Id: index.php 147 2012-01-27 10:13:23Z info@sah-company.com $
 */

/**
 * Set error reporting mode to E_ALL | E_STRICT.
 */
error_reporting(E_ALL | E_STRICT);

/**
 * modus in which the application runs.
 *
 * Once you have finished your web application and everything works fine, set this constant
 * to something different than DEVELOPMENT. This will make sure that error management or
 * database stuff will not reveal developer information to the public. If you are using the
 * RedBean ORM library the database will freeze if you do not set this to development.
 *
 * @const string
 */
define('MODUS', 'DEVELOPMENT');

/**
 * name of the application.
 *
 * @const string
 */
define('APP_NAME', 'Kalaisoo');

/**
 * slogan of the application.
 *
 * @const string
 */
define('APP_SLOGAN', 'The no-framework framework, written in PHP5.');

/**
 * define the look and feel by setting this constant.
 *
 * There must be a folder in css which holds all the stylesheets and graphics needed.
 *
 * @const string
 */
define('APPEARANCE', 'black');

/**
 * version of the style.
 *
 * This is the style version. If you change information in style sheets change this
 * string also and the browser will load the new styles better. Maybe. I think so?!
 *
 * @const string
 */
define('STYLE_VERSION', '1');

/**
 * the default author email address for html head meta tag.
 *
 * @const string
 */
define('AUTHOR_EMAIL', 'info@example.com');

/**
 * the default avatar size in pixels.
 *
 * @const int
 */
define('AVATAR_SIZE', 48);

/**
 * default meta description.
 *
 * @const string
 */
define('META_DESCRIPTION', 'This page was generated with Kalaisoo. Visit kalaisoo.com to learn about this no-framework framework');

/**
 * default meta keywords.
 *
 * @const string
 */
define('META_KEYWORDS', 'Kalaisoo,Framework,PHP,MySQL,CSS,HTML,HTML5,Hombergs,Stephan,Intranet,Extranet,Webanwendung,Webapp,Webapplication,Website,CMS,MVC,Model,View,Controller,Library,BSD');

/**
 * There is no need to change the following settings if you use Kalaisoo as it is.
 * Otherwise feel free to do so altogether. Have fun!
 */

/**
 * application version string.
 *
 * @const string
 */
define('VERSION', 'Winter 2011');

/**
 * path to your system folder.
 *
 * if you provide a leading / (slash) the system it is expected to be at that absolute path.
 *
 * @var string
 */
$sys = 'sys';

/**
 * path to your application folder.
 *
 * if you provide a leading / (slash) the app it is expected to be at that absolute path.
 *
 * @var string
 */
$app = 'app';

/**
 * The file extension under which php files will be looked up.
 *
 * @const string
 */
define('EXT', '.php');

/**
 * the directory where our application runs.
 *
 * @const string
 */
define('BASEURL', dirname($_SERVER['SCRIPT_NAME']));

/**
 * the document root of the filesystem.
 *
 * @const string
 */
define('BASEPATH', $_SERVER['DOCUMENT_ROOT'].BASEURL);

/**
 * the base href.
 *
 * @const string
 */
define('BASEHREF', 'http://'.$_SERVER['SERVER_NAME'].BASEURL);

/**
 * path to the sys(tem) directory.
 *
 * @const string
 */
if (substr($sys, 0, 1) != '/') {
	$sys = BASEPATH.'/'.$sys;
}
define('SYS', $sys);

/**
 * path to the app(lication) directory.
 *
 * @const string
 */
if (substr($app, 0, 1) != '/') {
	$app = BASEPATH.'/'.$app;
}
define('APP', $app);

/**
 * required the configuration file.
 */
require_once APP.'/config/config'.EXT;

/**
 * require the system.
 */
require_once SYS.'/core/refused'.EXT;

/**
 * Instanciate the Core class with our configuration array.
 */
$core = new Core($config);

/**
 * 3..2..1 We have a lift off!
 */
$core->run();
?>